home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / archie-1.4.1 / Makefile < prev    next >
Encoding:
Makefile  |  1995-06-18  |  5.8 KB  |  161 lines

  1. CTRBDESTDIR=/usr/skunk5
  2.  
  3. #
  4. # Makefile for the minimal build for an archie Prospero client.
  5. #
  6. # Your C compiler:
  7. CC=cc
  8.  
  9. # For most systems, these OPTIONS will suffice.  Exceptions:
  10. #
  11. #    * If you're on a Stardent, add  -43
  12. #    * If you're running EP/IX, you may need to add  -systype bsd43
  13. #      but try it without it first.
  14. #OPTIONS= -O -I. -I/usr/netinclude -I/usr/ucbinclude
  15. OPTIONS= -dy -O -I.
  16.  
  17. # For this, DEFINES is usually ok as-is.  Try it without any of these
  18. # first; if some stuff fails or shows up undefined, then come back and
  19. # add 'em.  Also please drop me a line if you had to add anything...ideally
  20. # things will reach a point where this whole section will be unnecessary.
  21. #
  22. #     * if you want to include the debugging code (so you
  23. #       can help with problem-solving if any crop up), add    -DDEBUG
  24. #     * if you're running Interactive Unix, add              -DISC
  25. #     * if you're running SCO Unix, add                  -DSCO
  26. #     * if you're running System V, add                  -DSYSV
  27. #     * if you're running a USG (System V.2) system, add      -DUSG
  28. #     * if you're running UTS, add                  -DUTS
  29. #     * if your system doesn't have the functions index(),
  30. #       rindex(), bcopy(), or bzero(), add                    -DFUNCS
  31. #     * if your system is missing the getenv(3) routine, add  -DGETENV
  32. #     * if your system doesn't have the re_comp/regcmp or re_exec/regex
  33. #       routines (no regex(3)/regcmp(3X) library), then add   -DNOREGEX
  34. #     * if your system is lacking strspn(), add               -DSTRSPN
  35. #     * if you're using the unbundled SparcCompiler on a
  36. #    Solaris 2 system, add                      -DSOLARIS2
  37. DEFINES= -DDEBUG -DSYSV -DSCO
  38.  
  39. # The default Archie server; choose one of:
  40. #    archie.ans.net        (USA [NY])
  41. #    archie.rutgers.edu        (USA [NJ])
  42. #    archie.sura.net        (USA [MD])
  43. #    archie.unl.edu        (USA [NE])
  44. #    archie.mcgill.ca        (Canada)
  45. #    archie.funet.fi        (Finland/Mainland Europe)
  46. #    archie.au            (Australia)
  47. #    archie.doc.ic.ac.uk    (Great Britain/Ireland)
  48. #    archie.wide.ad.jp        (Japan)
  49. #    archie.ncu.edu.tw        (Taiwan)
  50. #
  51. # Note this only applies to the command-line client; to change the
  52. # default for the Emacs lisp version, set the archie-server variable.
  53. ARCHIE= archie.sura.net
  54.  
  55. #    Usually LDFLAGS is empty; if, after you build this, archie
  56. #     complains that it can't resolve ARCHIE.ANS.NET (or whatever
  57. #     you defined ARCHIE_HOST as), you need to add `-lresolv'.
  58. #
  59. #    * If you need the PW library (e.g. A/UX), add -lPW
  60. #LDFLAGS=
  61. # If you're using ISC, use:
  62. #LDFLAGS= -linet
  63. # If you're using Wallongong TCP/IP on an AT&T box, use:
  64. #LDFLAGS= -lnet -lnsl_s
  65. # If you're using UTS, use:
  66. #LDFLAGS= -lsocket
  67. # If you're using System V Release 4, use:
  68. #LDFLAGS= -L/usr/ucblib -lucb -lsockdns -lnsl
  69. # If you're using Solaris 2.x (don't use /usr/ucb/cc!), use:
  70. #LDFLAGS= -lnsl -lsocket
  71. # If you're using Consensus SVR4, use:
  72. #LDFLAGS= -lnsl_i -lsocket -lucb
  73. # If you're using Dynix/PTX, use:
  74. #LDFLAGS= -lsocket -linet -lnsl -lPW
  75. LDFLAGS= -lsocket -lc_s
  76.  
  77. # =========================
  78. # Yer' done....make archie.
  79. # =========================
  80. #
  81. CFLAGS=$(OPTIONS) $(DEFINES) -DARCHIE_HOST=\"$(ARCHIE)\"
  82.  
  83. VERSION=1.4.1
  84. VMS_VERSION=`echo $(VERSION) | sed -e 's,\\.,_,g'`
  85.  
  86. OBJS=    aquery.o archie.o atalloc.o dirsend.o get_pauth.o get_vdir.o \
  87.     getopt.o getopt1.o \
  88.     perrmesg.o procquery.o ptalloc.o regex.o stcopy.o support.o \
  89.     vlalloc.o vl_comp.o
  90.  
  91. all: archie
  92.  
  93. archie: $(OBJS)
  94.     $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
  95.  
  96. install: archie
  97.     bsdinstall -s archie $(CTRBDESTDIR)/bin
  98.  
  99. clobber clean:
  100.     rm -f archie $(OBJS) make.out core
  101.  
  102. install.man:
  103.     bsdinstall -c -m 444 archie.man $(CTRBDESTDIR)/man/man1/archie.1
  104.  
  105. $(OBJS): archie.h pmachine.h pcompat.h Makefile
  106.  
  107. procquery.o: copyright.h
  108.  
  109. clean:
  110.     -rm -f *.o archie archie.doc
  111.  
  112. gclean: clean
  113.     -rm -f *~ archie.0* archie$(VMS_VERSION).com archie.tar* gmon.out archie.doc
  114.  
  115. unx-deadly:
  116.     unifdef -UXARCHIE xprocquery.c > procquery.c
  117.  
  118. FILES=    INSTALL Makefile Prospero README README.ALEX README.dos archie.c \
  119.     archie.h archie.el archie.lnk archie.doc archie.man archie.hlp \
  120.     aquery.c atalloc.c dirsend.c get_pauth.c get_vdir.c \
  121.     getopt.c getopt.h getopt1.c \
  122.     make.com makefile.cut makefile.dos makefile.os2 makefile.nfs \
  123.     msdos/cutcp.h msdos/hostform.h msdos/netevent.h pc-archie.nfs \
  124.     perrmesg.c patchlevel.h pauthent.h pcompat.h perrno.h pfs.h pmachine.h \
  125.     pprot.h procquery.c ptalloc.c rdgram.h regex.c regex.h stcopy.c \
  126.     support.c copyright.h vl_comp.c vlalloc.c vms.h vms_support.c \
  127.     vms/fd.h vms/in.h vms/pseudos.h vms/signal.h vms/socket.h vms/time.h \
  128.     vms/types.h vms/network.h vms/multi.opt vms/ucx.opt vms/woll.opt
  129.  
  130. BFILES= $(FILES) xprocquery.c
  131.  
  132. dist: tar shar dcl
  133.  
  134. shar: archie.doc
  135.     makekit -narchie-$(VERSION). archie-$(VERSION) `echo $(FILES) | \
  136.         tr ' ' '\012' | sed -e "s/^/archie-$(VERSION)\//g"` \
  137.         vms msdos > Manifest
  138.  
  139. archie.doc: archie.man
  140.     nroff -man archie.man | tr '\010' _ | sed -e s/__//g > archie.doc
  141.  
  142. dcl: archie.doc
  143.     if [ ! -d archie$(VMS_VERSION)/ ]; then ln -s . archie$(VMS_VERSION); fi
  144.     echo '$$ write sys$$output "Unpacking..."' > archie$(VMS_VERSION).com
  145.     echo '$$ if f$$search("archie.dir") .eqs. "" then create/dir [.ARCHIE]' >> archie$(VMS_VERSION).com
  146.     echo '$$ if f$$search("[.archie]vms.dir") .eqs. "" then create/dir [.ARCHIE.VMS]' >> archie$(VMS_VERSION).com
  147.     echo '$$ if f$$search("[.archie]msdos.dir") .eqs. "" then create/dir [.ARCHIE.MSDOS]' >> archie$(VMS_VERSION).com
  148.     echo '$$ set noverify' >> archie$(VMS_VERSION).com
  149.     -rm -f archie
  150.     ln -s . archie
  151.     dclshar `echo "$(FILES)" | tr ' ' '\012' | \
  152.         sed -e "s/^/archie\//g"` >> archie$(VMS_VERSION).com
  153.     -rm -f archie
  154.     ver=$(VMS_VERSION); echo '$$ write sys$$output "Ok, now enter the $$ver directory, look at MAKE.COM, then type @MAKE ."' >> archie$(VMS_VERSION).com
  155.  
  156. tar: archie.doc
  157.     if [ ! -d archie-$(VERSION)/ ]; then ln -s . archie-$(VERSION); fi
  158.     tar cvf archie-$(VERSION).tar `echo $(FILES) |\
  159.      tr ' ' '\012' | sed -e "s/^/archie-$(VERSION)\//g"`
  160.     compress -f archie-$(VERSION).tar
  161.